<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Document</title>
</head>
<body>
    

    <script>
      var d = new Date();
    //   console.log(d);
    // console.log(d.getFullYear());
    // console.log(d.getMonth());
    // console.log(d.getDate());
    // console.log(d.getDay());
    // console.log(d.getHours());
    // console.log(d.getMinutes());
    // console.log(d.getSeconds());
    // console.log(d.getMilliseconds());
    // console.log(d.getUTCDate());
    // console.log(d.getTime());
    // console.log(Date.now());
//  d.setFullYear(2038);
//  d.setMonth(12);
//  d.setDate(11);
// d.setUTCHours(23);
//  console.log(d);
//  var d = new Date(2023/03/04);
//  console.log(d);
//  console.log(d.toLocaleString());
//  console.log(d.toLocaleDateString());


// Math  数学
console.log(Math.PI);
var num = 24.13;
var num1 = 24.76;
console.log(Math.ceil(num));  //向上取整
console.log(Math.floor(num));  //向下取整
console.log(Math.round(num1)); //四舍五入
console.log(Math.random()); // [0,1)取0-1之间的数，不包含1
console.log(Math.round(Math.random()*(10-5))+5); // [5-10]之间的数
function fn(min,max){
return (Math.round(Math.random()*(max - min))+  min)
}
console.log(fn(2,6));

// 三角函数
    var angle = 30;
    var x = Math.cos(30*Math.PI/180)*100;
    var y = Math.sin(30*Math.PI/180)*100;




      

        
    </script>
</body>
</html>